{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}
{% block title %}{{ '头像图片'|trans }}{% endblock %}
 {% set modal_class= 'modal-lg' %}
{% block body %}
  <form id="avatar-crop-form" method="post">
    <div class="form-group clearfix">
      <div class="col-md-offset-2 col-md-8 controls" style=" width: 750px;">
        <img src="{{ filepath(pictureUrl) }}"
             id="avatar-crop"
             width="{{ scaledSize.width }}" height="{{ scaledSize.height }}"
             data-natural-width="{{ naturalSize.width }}" data-natural-height="{{ naturalSize.height }}"/>
        <div class="help-block">{{ '提示：请选择图片裁剪区域。'|trans }}</div>
      </div>
    </div>
  </form>
{% endblock %}

{% block footer %}
  <button type="submit" class="btn btn-primary pull-right" id="upload-avatar-btn"
          data-url="{{ path('settings_avatar_crop_modal') }}" data-toggle="form-submit"
          data-target="#avatar-crop-form">{{ '保存'|trans }}</button>
  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{ '取消'|trans }}</button>
  <script>app.load('settings/avatar-crop-modal')</script>
{% endblock %}